package sutl

import (
	"gitee.com/xiakai001/goutl/errutl"
	"gitee.com/xiakai001/goutl/goutl"
)

func GetInt64LinesFromFile(filePath string) []int64 {
	arr, err := goutl.GetLinesFromFile(filePath, goutl.SkipLineSpace, goutl.ParseStrToInt[int64])
	errutl.CheckErr(err)
	return arr
}

func GetStringLinesFromFile(filePath string) []string {
	arr, err := goutl.GetLinesFromFile[string](filePath, goutl.SkipLineSpace, nil)
	errutl.CheckErr(err)
	return arr
}

func WriteLineToFile(filePath string, line ...string) {
	err := goutl.WriteLinesToFile(filePath, line)
	errutl.CheckErr(err)
}

func WriteLinesToFile(filePath string, lines []string) {
	err := goutl.WriteLinesToFile(filePath, lines)
	errutl.CheckErr(err)
}
